<?php 

namespace pmvc\mvc\security\facebook;

use pmvc\util\ClassUtil;
use pmvc\ioc\FactoryObject;

class FacebookFactoryObject
	implements FactoryObject {

	private $facebookApiPath;
	private $initParams = Array();

	public function createObject() {
		if (isset($this->facebookApiPath) && !empty($this->facebookApiPath)) {
			ClassUtil::requireFile($this->facebookApiPath, TRUE);
		}
		return new \Facebook($this->initParams);
	}

	public function setInitParams(Array $initParams) {
		$this->initParams = $initParams;
	}

	public function setFacebookApiPath($facebookApiPath) {
		$this->facebookApiPath = $facebookApiPath;
	}

}

?>